//手工录入页面

Ext.DataEnteringPanel = Ext.extend(Ext.TabPanel,{
	initialized:false,
	loadData:function(){
	this.store.load();
},
    initComponent:function(){
	    this.renderTo = document.body,
	    this.activeTab = 0,
	    this.plain = true,
	    this.defaults = {
	    		autoScroll: true
	    },
	    this.items = [{
	    	labelAlign: 'right',
	    	labelWidth: 100,
	    	title:'项目基本信息',
	    	layout: 'form',
	    	frame: true,
	    	defaultType: 'textfield',
	    	defaults: {width: 300},
	    	items:[{
	    		xtype: 'numberfield',
	    		fieldLabel: '项目编号',
	    		name: '',
	    		allBlank: false,
	    		blankText: '请输入项目编号！',
	    		emptyText: '必填项'
	    	},{
	    		fieldLabel: '项目名称',
	    		name: '',
	    		allBlank: false,
	    		blankText: '请输入项目名称！',
	    		emptyText: '必填项'
	    	},{
	    		fieldLabel: '主承担单位',
	    		name: '',
	    		allBlank: false,
	    		blankText: '请输入主承担单位！',
	    		emptyText: '必填项'
	    	},{
	    		fieldLabel: '联合单位1',
	    		name: '',
	    		allBlank: false,
	    		blankText: '请输入联合单位！',
	    		emptyText: '必填项'
	    	},{
	    		fieldLabel: '联合单位2',
	    		name: '',
	    		allBlank: false,
	    		blankText: '请输入联合单位！',
	    		emptyText: '必填项'
	    	},{
	    		fieldLabel: '保证单位',
	    		name: '',
	    		allBlank: false,
	    		blankText: '请输入保证单位！',
	    		emptyText: '必填项'
	    	},{
	    		xtype: 'datefield',
	    		fieldLabel: '立项年度',
	    		name: '',
	    		allBlank: false,
	    		blankText: '请选择立项年度！',
	    		emptyText: '必填项'
	    	},{
	    		fieldLabel: '主管处室',
	    		name: '',
	    		allBlank: false,
	    		blankText: '请输入主管处室！',
	    		emptyText: '必填项'
//	    	},{
//	    		xtype: 'combobox',
//	    		store: store,
//	    		emptyText: '请选择跟进人！',
//	    		mode: 'local' ,
//	    		triggerAction:  'all',
//	    		valueField: 'value',
//	    		displayField: 'text'
	    	}]
	    },{
	    	labelAlign: 'right',
	    	labelWidth: 100,
	    	title:'项目详细信息',
	    	layout: 'form',
		    frame: true,
		    defaultType: 'textfield',
		    defaults:{
	    	  width: 300
	    },
		    items:[{
		    	fieldLabel: '项目计划类别',
	    		name: '',
	    		allBlank: false,
	    		blankText: '请输入类别！',
	    		emptyText: '必填项'
		    },{
		    	fieldLabel: '招标项目名称',
	    		name: '',
	    		allBlank: false,
	    		blankText: '请输入招标项目名称！',
	    		emptyText: '必填项'
		    },{
		    	fieldLabel: '子项目名称',
	    		name: '',
	    		allBlank: false,
	    		blankText: '请输入子项目名称！',
	    		emptyText: '必填项'
		    },{
		    	xtype: 'numberfield',
		    	fieldLabel: '下达文件编号',
		    	name: 'number',
		    	blankText: '请输入下达文件编号！',
		    	emptyText: '必填项'
		    },{
		    	xtype: 'datefield',
		    	fieldLabel: '合同开始日期',
		    	name: 'beginDate'
		    },{
		    	xtype: 'datefield',
		    	fieldLabel: '合同结束日期',
		    	name: 'endDate'
		    },{
		    	xtype: 'numberfield',
		    	fieldLabel: '中标金额（万元）',
		    	name: 'number',
		    	blankText: '请输入中标金额！',
		    	emptyText: '必填项'
		    },{
		    	xtype: 'fieldset',
		    	title: '',
		    	collapsible : true, //可折叠
                collapseFirst : true,
                fieldLabel: '项目负责人',
                autoHeight: true,
		    	items: [{
		    		    xtype: 'textfield',
						fieldLabel: '项目负责人',
						name: 'projectDirector',
					},{
						xtype: 'numberfield',
				    	fieldLabel: '办公室电话',
				    	name: 'officePhone',
					},{
						xtype: 'numberfield',
				    	fieldLabel: '移动电话',
				    	name: 'mobilePhone',
					},{
						xtype: 'textfield',
						fieldLabel: '负责人email',
						name: 'directorEmail',
					}]
		    },{
		    	xtype: 'fieldset',
		    	title: '',
		    	collapsible : true, //可折叠
                collapseFirst : true,
                fieldLabel: '项目联系人',
                autoHeight: true,
		    	items: [{
		    		    xtype: 'textfield',
						fieldLabel: '项目联系人',
						name: 'projectDirector',
					},{
						xtype: 'numberfield',
				    	fieldLabel: '电话1',
				    	name: 'officePhone',
					},{
						xtype: 'numberfield',
				    	fieldLabel: '电话2',
				    	name: 'mobilePhone',
					},{
						xtype: 'textfield',
						fieldLabel: '联系人email',
						name: 'directorEmail',
					}]
		    
		    }]
		},{
	    	labelAlign: 'right',
	    	labelWidth: 100,
	    	title:'项目验收情况',
	    	layout: 'form',
		    frame: true,
		    defaultType: 'textfield',
		    defaults:{
		    	  width:300 
		    },
		    items: [{
		    	xtype: 'combo',
		    	fieldLabel: '是否已验收',
		    	name: '',
		    	store: new Ext.data.SimpleStore({
		    		fields: ['value','text'],
		    		data: [
		    		       ['value1','是'],
		    		       ['value2','否']
		    		       ]
		    	}),
		    	displayField: 'text',
		    	valueField: 'value',
		    	triggerAction:  'all',
		    	mode: 'local',
		    	emptyText: '请选择'
		    },{
		    	xtype: 'datefield',
		    	fieldLabel: '验收时间',
		    	name: ''
		    },{
		    	xtype: 'combo',
		    	fieldLabel: '项目进度',
		    	name: '',
		    	store: new Ext.data.SimpleStore({
		    		fields: ['value','text'],
		    		data: [
		    		       ['value1','合同评审阶段'],
		    		       ['value2','实施阶段'],
		    		       ['value3','已到期未验收'],
		    		       ['value4','已验收'],
		    		       ['value5','延期'],
		    		       ['value6','合同签订'],
		    		       ['value7','项目实施'],
		    		       ['value8','项目到期未验收'],
		    		       ['value9','准备验收'],
		    		       ['value1','结题'],
		    		       ]
		    	}),
		    	displayField: 'text',
		    	valueField: 'value',
		    	triggerAction:  'all',
		    	mode: 'local',
		    	emptyText: '请选择'
		    
		    },{
		    	xtype: 'combo',
		    	fieldLabel: '项目进度',
		    	name: '',
		    	store: new Ext.data.SimpleStore({
		    		fields: ['value','text'],
		    		data: [
		    		       ['value1','已完成项目负责人变更'],
		    		       ['value2','已提出延期申请变更'],
		    		       ]
		    	}),
		    	displayField: 'text',
		    	valueField: 'value',
		    	triggerAction:  'all',
		    	mode: 'local',
		    	emptyText: '请选择'
		    	    
		    }]
	    },{
	    	title:'项目合同要求成果形式',
	    	labelAlign: 'right',
	    	labelWidth: 100,
	    	layout: 'form',
	    	frame: true,
	    	defaultType: 'textfield',
	    	defaults:{
	    	  width:300 
	    },
	    	items: [{
	    		xtype : 'fieldset',
                title :'发明专利',
                collapsible : true, //可折叠
                collapseFirst : true,
                fieldLabel: '发明专利',
                autoHeight: true,
                layout: 'form',
                items: [{
                	xtype: 'numberfield',
    		    	fieldLabel: '申请',
    		    	name: 'number',
    		    	
    	    	},{
    	    		xtype: 'numberfield',
    		    	fieldLabel: '授权',
    		    	name: 'number',
                }]
	    	},{
	    		xtype : 'fieldset',
                title :'实用新型',
                collapsible : true, //可折叠
                collapseFirst : true,
                fieldLabel: '实用新型',
                autoHeight: true,
                layout: 'form',
                items: [{
                	xtype: 'numberfield',
    		    	fieldLabel: '申请',
    		    	name: 'number',
    		    	
    	    	},{
    	    		xtype: 'numberfield',
    		    	fieldLabel: '授权',
    		    	name: 'number',
                }]
	    	
	    	},{
	    		xtype : 'fieldset',
                title :'外观设计',
                collapsible : true, //可折叠
                collapseFirst : true,
                fieldLabel: '外观设计',
                autoHeight: true,
                layout: 'form',
                items: [{
                	xtype: 'numberfield',
    		    	fieldLabel: '申请',
    		    	name: 'number',
    		    	
    	    	},{
    	    		xtype: 'numberfield',
    		    	fieldLabel: '授权',
    		    	name: 'number',
                }]
	    	},{
	    		xtype: 'numberfield',
		    	fieldLabel: '外国专利',
		    	name: 'number',
	    	},{
	    		xtype: 'numberfield',
		    	fieldLabel: '新工艺',
		    	name: 'number',
	    	},{
	    		xtype: 'numberfield',
		    	fieldLabel: '新产品',
		    	name: 'number',
	    	},{
	    		xtype: 'numberfield',
		    	fieldLabel: '新材料',
		    	name: 'number',
	    	},{
	    		xtype: 'numberfield',
		    	fieldLabel: '新设备',
		    	name: 'number',
	    	},{
	    		xtype: 'numberfield',
		    	fieldLabel: '计算机软件',
		    	name: 'number',
	    	},{
	    		xtype: 'numberfield',
		    	fieldLabel: '论文论著',
		    	name: 'number',
	    	},{
	    		xtype: 'numberfield',
		    	fieldLabel: '技术标准',
		    	name: 'number',
	    	},{
	    		xtype : 'fieldset',
                title :'科技成果奖励',
                collapsible : true, //可折叠
                collapseFirst : true,
                fieldLabel: '科技成果奖励',
                autoHeight: true,
                layout: 'form',
                items: [{
                	xtype: 'numberfield',
                	fieldLabel: '国家级',
//    		    	width: 50,
    		    	name: 'number',
                },{
                	xtype: 'numberfield',
    		    	fieldLabel: '省部级',
    		    	name: 'number',
                },{
                	xtype: 'numberfield',
    		    	fieldLabel: '市级',
    		    	name: 'number',
                }]
	    	},{
	    		xtype : 'fieldset',
                title :'培养人才',
                collapsible : true, //可折叠
                collapseFirst : true,
                fieldLabel: '培养人才',
                autoHeight: true,
                layout: 'form',
                items: [{
                	xtype: 'numberfield',
    		    	fieldLabel: '博士',
    		    	name: 'number',
                },{
                	xtype: 'numberfield',
    		    	fieldLabel: '硕士',
    		    	name: 'number',
                },{
                	xtype: 'numberfield',
    		    	fieldLabel: '本科',
    		    	name: 'number',
                }]
	    	},{

	    		xtype: 'numberfield',
		    	fieldLabel: '到位经费（万元）',
		    	name: 'number',
	    	},{
	    		xtype: 'numberfield',
		    	fieldLabel: '经费投入（万元）',
		    	name: 'number',
	    	},{
	    		xtype: 'numberfield',
		    	fieldLabel: '已获收益（万元）',
		    	name: 'number',
	    	}]
	    },{
	    	title:'项目总结',
	    	labelAlign: 'right',
	    	labelWidth: 100,
	    	frame: true,
	    	items: [{
	    		xtype: 'textarea',
	    		fieldLabel: '项目总结',
	    		name:'',
	    		width: 500,
	    		grow: true,
	    		preventScrollbars: true,
	    		allowBlank: true,
	    	}],
	    	buttons:[{
	    		text: '写入',
	    		handler: submit
	    	},{
	    		text: '保存',
	    		handler: save
	    	},{
	    		text: '取消',
	    		handler: cancle
	    	}]
	    }];
    Ext.DataEnteringPanel.superclass.initComponent.call(this);
}
})